# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20430) END FROM WidgetInst WHERE WidgetInstId = 20430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20431) END FROM WidgetInst WHERE WidgetInstId = 20431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20478) END FROM WidgetInst WHERE WidgetInstId = 20478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20479) END FROM WidgetInst WHERE WidgetInstId = 20479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20478) END FROM WidgetInst WHERE WidgetInstId = 20478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20479) END FROM WidgetInst WHERE WidgetInstId = 20479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20478) END FROM WidgetInst WHERE WidgetInstId = 20478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20479) END FROM WidgetInst WHERE WidgetInstId = 20479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20478) END FROM WidgetInst WHERE WidgetInstId = 20478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20479) END FROM WidgetInst WHERE WidgetInstId = 20479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 20522) END FROM WidgetInst WHERE WidgetInstId = 20522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 20523) END FROM WidgetInst WHERE WidgetInstId = 20523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20522) END FROM WidgetInst WHERE WidgetInstId = 20522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20523) END FROM WidgetInst WHERE WidgetInstId = 20523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20522) END FROM WidgetInst WHERE WidgetInstId = 20522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20523) END FROM WidgetInst WHERE WidgetInstId = 20523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20522) END FROM WidgetInst WHERE WidgetInstId = 20522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20523) END FROM WidgetInst WHERE WidgetInstId = 20523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20522) END FROM WidgetInst WHERE WidgetInstId = 20522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20523) END FROM WidgetInst WHERE WidgetInstId = 20523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20522) END FROM WidgetInst WHERE WidgetInstId = 20522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20523) END FROM WidgetInst WHERE WidgetInstId = 20523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20552) END FROM WidgetInst WHERE WidgetInstId = 20552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20553) END FROM WidgetInst WHERE WidgetInstId = 20553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 20623) END FROM WidgetInst WHERE WidgetInstId = 20623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 20625) END FROM WidgetInst WHERE WidgetInstId = 20625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 20623) END FROM WidgetInst WHERE WidgetInstId = 20623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 20625) END FROM WidgetInst WHERE WidgetInstId = 20625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20623) END FROM WidgetInst WHERE WidgetInstId = 20623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20625) END FROM WidgetInst WHERE WidgetInstId = 20625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20623) END FROM WidgetInst WHERE WidgetInstId = 20623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20625) END FROM WidgetInst WHERE WidgetInstId = 20625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20623) END FROM WidgetInst WHERE WidgetInstId = 20623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20625) END FROM WidgetInst WHERE WidgetInstId = 20625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 20623) END FROM WidgetInst WHERE WidgetInstId = 20623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 20625) END FROM WidgetInst WHERE WidgetInstId = 20625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 20623) END FROM WidgetInst WHERE WidgetInstId = 20623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 20625) END FROM WidgetInst WHERE WidgetInstId = 20625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 20618) END FROM WidgetInst WHERE WidgetInstId = 20618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 20702) END FROM WidgetInst WHERE WidgetInstId = 20702) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20712) END FROM WidgetInst WHERE WidgetInstId = 20712) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 20715) END FROM WidgetInst WHERE WidgetInstId = 20715) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 20720) END FROM WidgetInst WHERE WidgetInstId = 20720) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 20720) END FROM WidgetInst WHERE WidgetInstId = 20720) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20712) END FROM WidgetInst WHERE WidgetInstId = 20712) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20738;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 20752;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 20752;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 20752;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 20752;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 20752;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 20752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20755) END FROM WidgetInst WHERE WidgetInstId = 20755) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20772) END FROM WidgetInst WHERE WidgetInstId = 20772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20772) END FROM WidgetInst WHERE WidgetInstId = 20772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20781) END FROM WidgetInst WHERE WidgetInstId = 20781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20781) END FROM WidgetInst WHERE WidgetInstId = 20781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20781) END FROM WidgetInst WHERE WidgetInstId = 20781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20793) END FROM WidgetInst WHERE WidgetInstId = 20793)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20793) END FROM WidgetInst WHERE WidgetInstId = 20793)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20811) END FROM WidgetInst WHERE WidgetInstId = 20811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20811) END FROM WidgetInst WHERE WidgetInstId = 20811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20795) END FROM WidgetInst WHERE WidgetInstId = 20795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20856) END FROM WidgetInst WHERE WidgetInstId = 20856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20856) END FROM WidgetInst WHERE WidgetInstId = 20856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20856) END FROM WidgetInst WHERE WidgetInstId = 20856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20872) END FROM WidgetInst WHERE WidgetInstId = 20872) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20872) END FROM WidgetInst WHERE WidgetInstId = 20872) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20872) END FROM WidgetInst WHERE WidgetInstId = 20872) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20892) END FROM WidgetInst WHERE WidgetInstId = 20892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20892) END FROM WidgetInst WHERE WidgetInstId = 20892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20892) END FROM WidgetInst WHERE WidgetInstId = 20892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20912) END FROM WidgetInst WHERE WidgetInstId = 20912) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20912) END FROM WidgetInst WHERE WidgetInstId = 20912) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20912) END FROM WidgetInst WHERE WidgetInstId = 20912) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20918) END FROM WidgetInst WHERE WidgetInstId = 20918) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20912) END FROM WidgetInst WHERE WidgetInstId = 20912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20918) END FROM WidgetInst WHERE WidgetInstId = 20918) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20912) END FROM WidgetInst WHERE WidgetInstId = 20912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20918) END FROM WidgetInst WHERE WidgetInstId = 20918) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20912) END FROM WidgetInst WHERE WidgetInstId = 20912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20927) END FROM WidgetInst WHERE WidgetInstId = 20927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20927) END FROM WidgetInst WHERE WidgetInstId = 20927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20927) END FROM WidgetInst WHERE WidgetInstId = 20927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20927) END FROM WidgetInst WHERE WidgetInstId = 20927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 20752) END FROM WidgetInst WHERE WidgetInstId = 20752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20951) END FROM WidgetInst WHERE WidgetInstId = 20951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20951) END FROM WidgetInst WHERE WidgetInstId = 20951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20951) END FROM WidgetInst WHERE WidgetInstId = 20951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20951) END FROM WidgetInst WHERE WidgetInstId = 20951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20969;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 20973) END FROM WidgetInst WHERE WidgetInstId = 20973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20973) END FROM WidgetInst WHERE WidgetInstId = 20973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20973) END FROM WidgetInst WHERE WidgetInstId = 20973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20973) END FROM WidgetInst WHERE WidgetInstId = 20973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20973) END FROM WidgetInst WHERE WidgetInstId = 20973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20973) END FROM WidgetInst WHERE WidgetInstId = 20973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20988) END FROM WidgetInst WHERE WidgetInstId = 20988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20989;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21005;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21005;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21005;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21005;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21005;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21005;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21006;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21006;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21006;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21006;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21006;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21006;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21007;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21007;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21007;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21007;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21007;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21007;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21008;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21008;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21008;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21008;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21008;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21008;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21009;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21009;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21009;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21009;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21009;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21009;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21010;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21010;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21010;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21010;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21010;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21010;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21011;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21011;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21011;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21011;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21011;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21026) END FROM WidgetInst WHERE WidgetInstId = 21026) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21027) END FROM WidgetInst WHERE WidgetInstId = 21027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21028) END FROM WidgetInst WHERE WidgetInstId = 21028) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21029) END FROM WidgetInst WHERE WidgetInstId = 21029) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21030) END FROM WidgetInst WHERE WidgetInstId = 21030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21031) END FROM WidgetInst WHERE WidgetInstId = 21031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21032) END FROM WidgetInst WHERE WidgetInstId = 21032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21052;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21090;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21145) END FROM WidgetInst WHERE WidgetInstId = 21145) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21146) END FROM WidgetInst WHERE WidgetInstId = 21146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21147) END FROM WidgetInst WHERE WidgetInstId = 21147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21148) END FROM WidgetInst WHERE WidgetInstId = 21148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21149) END FROM WidgetInst WHERE WidgetInstId = 21149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21150) END FROM WidgetInst WHERE WidgetInstId = 21150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21151) END FROM WidgetInst WHERE WidgetInstId = 21151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21145) END FROM WidgetInst WHERE WidgetInstId = 21145) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21146) END FROM WidgetInst WHERE WidgetInstId = 21146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21147) END FROM WidgetInst WHERE WidgetInstId = 21147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21148) END FROM WidgetInst WHERE WidgetInstId = 21148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21149) END FROM WidgetInst WHERE WidgetInstId = 21149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21150) END FROM WidgetInst WHERE WidgetInstId = 21150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21151) END FROM WidgetInst WHERE WidgetInstId = 21151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21208) END FROM WidgetInst WHERE WidgetInstId = 21208) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21209) END FROM WidgetInst WHERE WidgetInstId = 21209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21210) END FROM WidgetInst WHERE WidgetInstId = 21210) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21211) END FROM WidgetInst WHERE WidgetInstId = 21211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21212) END FROM WidgetInst WHERE WidgetInstId = 21212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21213) END FROM WidgetInst WHERE WidgetInstId = 21213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21214) END FROM WidgetInst WHERE WidgetInstId = 21214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21208) END FROM WidgetInst WHERE WidgetInstId = 21208) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21209) END FROM WidgetInst WHERE WidgetInstId = 21209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21210) END FROM WidgetInst WHERE WidgetInstId = 21210) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21211) END FROM WidgetInst WHERE WidgetInstId = 21211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21212) END FROM WidgetInst WHERE WidgetInstId = 21212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21213) END FROM WidgetInst WHERE WidgetInstId = 21213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21214) END FROM WidgetInst WHERE WidgetInstId = 21214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21208) END FROM WidgetInst WHERE WidgetInstId = 21208) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21209) END FROM WidgetInst WHERE WidgetInstId = 21209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21210) END FROM WidgetInst WHERE WidgetInstId = 21210) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21211) END FROM WidgetInst WHERE WidgetInstId = 21211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21212) END FROM WidgetInst WHERE WidgetInstId = 21212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21213) END FROM WidgetInst WHERE WidgetInstId = 21213) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21214) END FROM WidgetInst WHERE WidgetInstId = 21214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21292) END FROM WidgetInst WHERE WidgetInstId = 21292)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21293) END FROM WidgetInst WHERE WidgetInstId = 21293)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21294) END FROM WidgetInst WHERE WidgetInstId = 21294)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21295) END FROM WidgetInst WHERE WidgetInstId = 21295)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21296) END FROM WidgetInst WHERE WidgetInstId = 21296)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21297) END FROM WidgetInst WHERE WidgetInstId = 21297)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21298) END FROM WidgetInst WHERE WidgetInstId = 21298)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21292) END FROM WidgetInst WHERE WidgetInstId = 21292)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21293) END FROM WidgetInst WHERE WidgetInstId = 21293)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21294) END FROM WidgetInst WHERE WidgetInstId = 21294)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21295) END FROM WidgetInst WHERE WidgetInstId = 21295)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21296) END FROM WidgetInst WHERE WidgetInstId = 21296)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21297) END FROM WidgetInst WHERE WidgetInstId = 21297)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21298) END FROM WidgetInst WHERE WidgetInstId = 21298)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21418) END FROM WidgetInst WHERE WidgetInstId = 21418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21419) END FROM WidgetInst WHERE WidgetInstId = 21419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21420) END FROM WidgetInst WHERE WidgetInstId = 21420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21421) END FROM WidgetInst WHERE WidgetInstId = 21421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21422) END FROM WidgetInst WHERE WidgetInstId = 21422) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21423) END FROM WidgetInst WHERE WidgetInstId = 21423) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21424) END FROM WidgetInst WHERE WidgetInstId = 21424) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21418) END FROM WidgetInst WHERE WidgetInstId = 21418) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21419) END FROM WidgetInst WHERE WidgetInstId = 21419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21420) END FROM WidgetInst WHERE WidgetInstId = 21420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21421) END FROM WidgetInst WHERE WidgetInstId = 21421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21422) END FROM WidgetInst WHERE WidgetInstId = 21422) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21423) END FROM WidgetInst WHERE WidgetInstId = 21423) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21424) END FROM WidgetInst WHERE WidgetInstId = 21424) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21306) END FROM WidgetInst WHERE WidgetInstId = 21306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21307) END FROM WidgetInst WHERE WidgetInstId = 21307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21309) END FROM WidgetInst WHERE WidgetInstId = 21309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21310) END FROM WidgetInst WHERE WidgetInstId = 21310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21311) END FROM WidgetInst WHERE WidgetInstId = 21311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21312) END FROM WidgetInst WHERE WidgetInstId = 21312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21733) END FROM WidgetInst WHERE WidgetInstId = 21733) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21734) END FROM WidgetInst WHERE WidgetInstId = 21734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21735) END FROM WidgetInst WHERE WidgetInstId = 21735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21736) END FROM WidgetInst WHERE WidgetInstId = 21736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21737) END FROM WidgetInst WHERE WidgetInstId = 21737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21738) END FROM WidgetInst WHERE WidgetInstId = 21738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21745;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21739) END FROM WidgetInst WHERE WidgetInstId = 21739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21733) END FROM WidgetInst WHERE WidgetInstId = 21733) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21734) END FROM WidgetInst WHERE WidgetInstId = 21734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21735) END FROM WidgetInst WHERE WidgetInstId = 21735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21736) END FROM WidgetInst WHERE WidgetInstId = 21736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21737) END FROM WidgetInst WHERE WidgetInstId = 21737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21738) END FROM WidgetInst WHERE WidgetInstId = 21738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21739) END FROM WidgetInst WHERE WidgetInstId = 21739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21733) END FROM WidgetInst WHERE WidgetInstId = 21733) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21734) END FROM WidgetInst WHERE WidgetInstId = 21734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21735) END FROM WidgetInst WHERE WidgetInstId = 21735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21736) END FROM WidgetInst WHERE WidgetInstId = 21736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21737) END FROM WidgetInst WHERE WidgetInstId = 21737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21738) END FROM WidgetInst WHERE WidgetInstId = 21738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21739) END FROM WidgetInst WHERE WidgetInstId = 21739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21845) END FROM WidgetInst WHERE WidgetInstId = 21845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21846) END FROM WidgetInst WHERE WidgetInstId = 21846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21847) END FROM WidgetInst WHERE WidgetInstId = 21847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21848) END FROM WidgetInst WHERE WidgetInstId = 21848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21849) END FROM WidgetInst WHERE WidgetInstId = 21849) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21850) END FROM WidgetInst WHERE WidgetInstId = 21850) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21851) END FROM WidgetInst WHERE WidgetInstId = 21851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21845) END FROM WidgetInst WHERE WidgetInstId = 21845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21846) END FROM WidgetInst WHERE WidgetInstId = 21846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21847) END FROM WidgetInst WHERE WidgetInstId = 21847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21848) END FROM WidgetInst WHERE WidgetInstId = 21848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21849) END FROM WidgetInst WHERE WidgetInstId = 21849) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21850) END FROM WidgetInst WHERE WidgetInstId = 21850) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21851) END FROM WidgetInst WHERE WidgetInstId = 21851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21845) END FROM WidgetInst WHERE WidgetInstId = 21845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21846) END FROM WidgetInst WHERE WidgetInstId = 21846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21847) END FROM WidgetInst WHERE WidgetInstId = 21847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21848) END FROM WidgetInst WHERE WidgetInstId = 21848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21849) END FROM WidgetInst WHERE WidgetInstId = 21849) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21850) END FROM WidgetInst WHERE WidgetInstId = 21850) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21851) END FROM WidgetInst WHERE WidgetInstId = 21851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21898;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21985) END FROM WidgetInst WHERE WidgetInstId = 21985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21986) END FROM WidgetInst WHERE WidgetInstId = 21986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21987) END FROM WidgetInst WHERE WidgetInstId = 21987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21988) END FROM WidgetInst WHERE WidgetInstId = 21988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21989) END FROM WidgetInst WHERE WidgetInstId = 21989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21990) END FROM WidgetInst WHERE WidgetInstId = 21990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21991) END FROM WidgetInst WHERE WidgetInstId = 21991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21985) END FROM WidgetInst WHERE WidgetInstId = 21985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21986) END FROM WidgetInst WHERE WidgetInstId = 21986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21987) END FROM WidgetInst WHERE WidgetInstId = 21987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21988) END FROM WidgetInst WHERE WidgetInstId = 21988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21989) END FROM WidgetInst WHERE WidgetInstId = 21989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21990) END FROM WidgetInst WHERE WidgetInstId = 21990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21991) END FROM WidgetInst WHERE WidgetInstId = 21991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21985) END FROM WidgetInst WHERE WidgetInstId = 21985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21986) END FROM WidgetInst WHERE WidgetInstId = 21986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21987) END FROM WidgetInst WHERE WidgetInstId = 21987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21988) END FROM WidgetInst WHERE WidgetInstId = 21988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21989) END FROM WidgetInst WHERE WidgetInstId = 21989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21990) END FROM WidgetInst WHERE WidgetInstId = 21990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21991) END FROM WidgetInst WHERE WidgetInstId = 21991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22125) END FROM WidgetInst WHERE WidgetInstId = 22125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22126) END FROM WidgetInst WHERE WidgetInstId = 22126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22127) END FROM WidgetInst WHERE WidgetInstId = 22127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22128) END FROM WidgetInst WHERE WidgetInstId = 22128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22129) END FROM WidgetInst WHERE WidgetInstId = 22129) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22130) END FROM WidgetInst WHERE WidgetInstId = 22130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22131) END FROM WidgetInst WHERE WidgetInstId = 22131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22125) END FROM WidgetInst WHERE WidgetInstId = 22125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22126) END FROM WidgetInst WHERE WidgetInstId = 22126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22127) END FROM WidgetInst WHERE WidgetInstId = 22127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22128) END FROM WidgetInst WHERE WidgetInstId = 22128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22129) END FROM WidgetInst WHERE WidgetInstId = 22129) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22130) END FROM WidgetInst WHERE WidgetInstId = 22130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22131) END FROM WidgetInst WHERE WidgetInstId = 22131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22125) END FROM WidgetInst WHERE WidgetInstId = 22125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22126) END FROM WidgetInst WHERE WidgetInstId = 22126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22127) END FROM WidgetInst WHERE WidgetInstId = 22127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22128) END FROM WidgetInst WHERE WidgetInstId = 22128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22129) END FROM WidgetInst WHERE WidgetInstId = 22129) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22130) END FROM WidgetInst WHERE WidgetInstId = 22130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22131) END FROM WidgetInst WHERE WidgetInstId = 22131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22167) END FROM WidgetInst WHERE WidgetInstId = 22167) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22125) END FROM WidgetInst WHERE WidgetInstId = 22125)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22168) END FROM WidgetInst WHERE WidgetInstId = 22168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22126) END FROM WidgetInst WHERE WidgetInstId = 22126)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22169) END FROM WidgetInst WHERE WidgetInstId = 22169) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22127) END FROM WidgetInst WHERE WidgetInstId = 22127)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22170) END FROM WidgetInst WHERE WidgetInstId = 22170) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22128) END FROM WidgetInst WHERE WidgetInstId = 22128)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22171) END FROM WidgetInst WHERE WidgetInstId = 22171) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22129) END FROM WidgetInst WHERE WidgetInstId = 22129)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22172) END FROM WidgetInst WHERE WidgetInstId = 22172) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22130) END FROM WidgetInst WHERE WidgetInstId = 22130)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22173) END FROM WidgetInst WHERE WidgetInstId = 22173) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22131) END FROM WidgetInst WHERE WidgetInstId = 22131)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22167) END FROM WidgetInst WHERE WidgetInstId = 22167) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22125) END FROM WidgetInst WHERE WidgetInstId = 22125)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22168) END FROM WidgetInst WHERE WidgetInstId = 22168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22126) END FROM WidgetInst WHERE WidgetInstId = 22126)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22169) END FROM WidgetInst WHERE WidgetInstId = 22169) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22127) END FROM WidgetInst WHERE WidgetInstId = 22127)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22190;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22170) END FROM WidgetInst WHERE WidgetInstId = 22170) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22128) END FROM WidgetInst WHERE WidgetInstId = 22128)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22171) END FROM WidgetInst WHERE WidgetInstId = 22171) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22129) END FROM WidgetInst WHERE WidgetInstId = 22129)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22172) END FROM WidgetInst WHERE WidgetInstId = 22172) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22130) END FROM WidgetInst WHERE WidgetInstId = 22130)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22173) END FROM WidgetInst WHERE WidgetInstId = 22173) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22131) END FROM WidgetInst WHERE WidgetInstId = 22131)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22167) END FROM WidgetInst WHERE WidgetInstId = 22167) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22125) END FROM WidgetInst WHERE WidgetInstId = 22125)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22168) END FROM WidgetInst WHERE WidgetInstId = 22168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22126) END FROM WidgetInst WHERE WidgetInstId = 22126)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22169) END FROM WidgetInst WHERE WidgetInstId = 22169) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22127) END FROM WidgetInst WHERE WidgetInstId = 22127)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22170) END FROM WidgetInst WHERE WidgetInstId = 22170) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22128) END FROM WidgetInst WHERE WidgetInstId = 22128)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22171) END FROM WidgetInst WHERE WidgetInstId = 22171) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22129) END FROM WidgetInst WHERE WidgetInstId = 22129)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22172) END FROM WidgetInst WHERE WidgetInstId = 22172) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22130) END FROM WidgetInst WHERE WidgetInstId = 22130)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22173) END FROM WidgetInst WHERE WidgetInstId = 22173) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22131) END FROM WidgetInst WHERE WidgetInstId = 22131)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22230) END FROM WidgetInst WHERE WidgetInstId = 22230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22231) END FROM WidgetInst WHERE WidgetInstId = 22231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22232) END FROM WidgetInst WHERE WidgetInstId = 22232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22233) END FROM WidgetInst WHERE WidgetInstId = 22233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22234) END FROM WidgetInst WHERE WidgetInstId = 22234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22235) END FROM WidgetInst WHERE WidgetInstId = 22235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22236) END FROM WidgetInst WHERE WidgetInstId = 22236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22230) END FROM WidgetInst WHERE WidgetInstId = 22230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22231) END FROM WidgetInst WHERE WidgetInstId = 22231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22232) END FROM WidgetInst WHERE WidgetInstId = 22232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22233) END FROM WidgetInst WHERE WidgetInstId = 22233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22234) END FROM WidgetInst WHERE WidgetInstId = 22234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22235) END FROM WidgetInst WHERE WidgetInstId = 22235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22236) END FROM WidgetInst WHERE WidgetInstId = 22236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22230) END FROM WidgetInst WHERE WidgetInstId = 22230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22231) END FROM WidgetInst WHERE WidgetInstId = 22231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22232) END FROM WidgetInst WHERE WidgetInstId = 22232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22233) END FROM WidgetInst WHERE WidgetInstId = 22233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22234) END FROM WidgetInst WHERE WidgetInstId = 22234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22235) END FROM WidgetInst WHERE WidgetInstId = 22235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22236) END FROM WidgetInst WHERE WidgetInstId = 22236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22230) END FROM WidgetInst WHERE WidgetInstId = 22230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22231) END FROM WidgetInst WHERE WidgetInstId = 22231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22232) END FROM WidgetInst WHERE WidgetInstId = 22232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22233) END FROM WidgetInst WHERE WidgetInstId = 22233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22234) END FROM WidgetInst WHERE WidgetInstId = 22234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22235) END FROM WidgetInst WHERE WidgetInstId = 22235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22236) END FROM WidgetInst WHERE WidgetInstId = 22236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22398) END FROM WidgetInst WHERE WidgetInstId = 22398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22399) END FROM WidgetInst WHERE WidgetInstId = 22399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22400) END FROM WidgetInst WHERE WidgetInstId = 22400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22401) END FROM WidgetInst WHERE WidgetInstId = 22401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22402) END FROM WidgetInst WHERE WidgetInstId = 22402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22403) END FROM WidgetInst WHERE WidgetInstId = 22403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22404) END FROM WidgetInst WHERE WidgetInstId = 22404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22398) END FROM WidgetInst WHERE WidgetInstId = 22398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22399) END FROM WidgetInst WHERE WidgetInstId = 22399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22400) END FROM WidgetInst WHERE WidgetInstId = 22400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22401) END FROM WidgetInst WHERE WidgetInstId = 22401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22402) END FROM WidgetInst WHERE WidgetInstId = 22402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22403) END FROM WidgetInst WHERE WidgetInstId = 22403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22404) END FROM WidgetInst WHERE WidgetInstId = 22404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22398) END FROM WidgetInst WHERE WidgetInstId = 22398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22399) END FROM WidgetInst WHERE WidgetInstId = 22399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22400) END FROM WidgetInst WHERE WidgetInstId = 22400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22401) END FROM WidgetInst WHERE WidgetInstId = 22401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22402) END FROM WidgetInst WHERE WidgetInstId = 22402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22403) END FROM WidgetInst WHERE WidgetInstId = 22403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22404) END FROM WidgetInst WHERE WidgetInstId = 22404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22398) END FROM WidgetInst WHERE WidgetInstId = 22398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22399) END FROM WidgetInst WHERE WidgetInstId = 22399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22400) END FROM WidgetInst WHERE WidgetInstId = 22400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22401) END FROM WidgetInst WHERE WidgetInstId = 22401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22402) END FROM WidgetInst WHERE WidgetInstId = 22402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22403) END FROM WidgetInst WHERE WidgetInstId = 22403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22404) END FROM WidgetInst WHERE WidgetInstId = 22404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22552) END FROM WidgetInst WHERE WidgetInstId = 22552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22553) END FROM WidgetInst WHERE WidgetInstId = 22553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22554) END FROM WidgetInst WHERE WidgetInstId = 22554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22555) END FROM WidgetInst WHERE WidgetInstId = 22555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22556) END FROM WidgetInst WHERE WidgetInstId = 22556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22557) END FROM WidgetInst WHERE WidgetInstId = 22557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22558) END FROM WidgetInst WHERE WidgetInstId = 22558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22552) END FROM WidgetInst WHERE WidgetInstId = 22552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22553) END FROM WidgetInst WHERE WidgetInstId = 22553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22554) END FROM WidgetInst WHERE WidgetInstId = 22554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22555) END FROM WidgetInst WHERE WidgetInstId = 22555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22556) END FROM WidgetInst WHERE WidgetInstId = 22556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22557) END FROM WidgetInst WHERE WidgetInstId = 22557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22558) END FROM WidgetInst WHERE WidgetInstId = 22558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22552) END FROM WidgetInst WHERE WidgetInstId = 22552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22553) END FROM WidgetInst WHERE WidgetInstId = 22553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22554) END FROM WidgetInst WHERE WidgetInstId = 22554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22555) END FROM WidgetInst WHERE WidgetInstId = 22555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22556) END FROM WidgetInst WHERE WidgetInstId = 22556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22557) END FROM WidgetInst WHERE WidgetInstId = 22557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22558) END FROM WidgetInst WHERE WidgetInstId = 22558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22552) END FROM WidgetInst WHERE WidgetInstId = 22552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22553) END FROM WidgetInst WHERE WidgetInstId = 22553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22554) END FROM WidgetInst WHERE WidgetInstId = 22554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22555) END FROM WidgetInst WHERE WidgetInstId = 22555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22556) END FROM WidgetInst WHERE WidgetInstId = 22556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22557) END FROM WidgetInst WHERE WidgetInstId = 22557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22558) END FROM WidgetInst WHERE WidgetInstId = 22558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22552) END FROM WidgetInst WHERE WidgetInstId = 22552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22553) END FROM WidgetInst WHERE WidgetInstId = 22553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22554) END FROM WidgetInst WHERE WidgetInstId = 22554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22555) END FROM WidgetInst WHERE WidgetInstId = 22555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22556) END FROM WidgetInst WHERE WidgetInstId = 22556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22557) END FROM WidgetInst WHERE WidgetInstId = 22557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22558) END FROM WidgetInst WHERE WidgetInstId = 22558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22552) END FROM WidgetInst WHERE WidgetInstId = 22552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22553) END FROM WidgetInst WHERE WidgetInstId = 22553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22554) END FROM WidgetInst WHERE WidgetInstId = 22554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22555) END FROM WidgetInst WHERE WidgetInstId = 22555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22556) END FROM WidgetInst WHERE WidgetInstId = 22556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22557) END FROM WidgetInst WHERE WidgetInstId = 22557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22558) END FROM WidgetInst WHERE WidgetInstId = 22558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21005) END FROM WidgetInst WHERE WidgetInstId = 21005) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21007) END FROM WidgetInst WHERE WidgetInstId = 21007) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21008) END FROM WidgetInst WHERE WidgetInstId = 21008) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21009) END FROM WidgetInst WHERE WidgetInstId = 21009) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21010) END FROM WidgetInst WHERE WidgetInstId = 21010) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21011) END FROM WidgetInst WHERE WidgetInstId = 21011) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22657) END FROM WidgetInst WHERE WidgetInstId = 22657) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22658) END FROM WidgetInst WHERE WidgetInstId = 22658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22659) END FROM WidgetInst WHERE WidgetInstId = 22659) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22660) END FROM WidgetInst WHERE WidgetInstId = 22660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22661) END FROM WidgetInst WHERE WidgetInstId = 22661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22662) END FROM WidgetInst WHERE WidgetInstId = 22662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22663) END FROM WidgetInst WHERE WidgetInstId = 22663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22670;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 22682;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 22682;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 22682;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 22682;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 22682;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 22682;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 22683;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 22683;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 22683;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 22683;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 22683;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 22683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 22688) END FROM WidgetInst WHERE WidgetInstId = 22688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22690;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 22689) END FROM WidgetInst WHERE WidgetInstId = 22689) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 20607) END FROM WidgetInst WHERE WidgetInstId = 20607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22722) END FROM WidgetInst WHERE WidgetInstId = 22722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22723) END FROM WidgetInst WHERE WidgetInstId = 22723) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22722) END FROM WidgetInst WHERE WidgetInstId = 22722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22723) END FROM WidgetInst WHERE WidgetInstId = 22723) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22737;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22740) END FROM WidgetInst WHERE WidgetInstId = 22740) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22741) END FROM WidgetInst WHERE WidgetInstId = 22741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22740) END FROM WidgetInst WHERE WidgetInstId = 22740) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22741) END FROM WidgetInst WHERE WidgetInstId = 22741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22740) END FROM WidgetInst WHERE WidgetInstId = 22740) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22741) END FROM WidgetInst WHERE WidgetInstId = 22741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22764) END FROM WidgetInst WHERE WidgetInstId = 22764)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22765) END FROM WidgetInst WHERE WidgetInstId = 22765)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22764) END FROM WidgetInst WHERE WidgetInstId = 22764)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22765) END FROM WidgetInst WHERE WidgetInstId = 22765)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22800) END FROM WidgetInst WHERE WidgetInstId = 22800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22801) END FROM WidgetInst WHERE WidgetInstId = 22801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22800) END FROM WidgetInst WHERE WidgetInstId = 22800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22801) END FROM WidgetInst WHERE WidgetInstId = 22801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22768) END FROM WidgetInst WHERE WidgetInstId = 22768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22769) END FROM WidgetInst WHERE WidgetInstId = 22769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22890) END FROM WidgetInst WHERE WidgetInstId = 22890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22891) END FROM WidgetInst WHERE WidgetInstId = 22891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22890) END FROM WidgetInst WHERE WidgetInstId = 22890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22891) END FROM WidgetInst WHERE WidgetInstId = 22891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22890) END FROM WidgetInst WHERE WidgetInstId = 22890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22891) END FROM WidgetInst WHERE WidgetInstId = 22891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22922) END FROM WidgetInst WHERE WidgetInstId = 22922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22923) END FROM WidgetInst WHERE WidgetInstId = 22923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22922) END FROM WidgetInst WHERE WidgetInstId = 22922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22923) END FROM WidgetInst WHERE WidgetInstId = 22923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22922) END FROM WidgetInst WHERE WidgetInstId = 22922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22923) END FROM WidgetInst WHERE WidgetInstId = 22923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22962) END FROM WidgetInst WHERE WidgetInstId = 22962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22963) END FROM WidgetInst WHERE WidgetInstId = 22963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22962) END FROM WidgetInst WHERE WidgetInstId = 22962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22968;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22963) END FROM WidgetInst WHERE WidgetInstId = 22963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22969;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22962) END FROM WidgetInst WHERE WidgetInstId = 22962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22963) END FROM WidgetInst WHERE WidgetInstId = 22963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23002) END FROM WidgetInst WHERE WidgetInstId = 23002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23003) END FROM WidgetInst WHERE WidgetInstId = 23003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23002) END FROM WidgetInst WHERE WidgetInstId = 23002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23003) END FROM WidgetInst WHERE WidgetInstId = 23003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23002) END FROM WidgetInst WHERE WidgetInstId = 23002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23003) END FROM WidgetInst WHERE WidgetInstId = 23003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23014) END FROM WidgetInst WHERE WidgetInstId = 23014) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23002) END FROM WidgetInst WHERE WidgetInstId = 23002)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23015) END FROM WidgetInst WHERE WidgetInstId = 23015) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23003) END FROM WidgetInst WHERE WidgetInstId = 23003)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23014) END FROM WidgetInst WHERE WidgetInstId = 23014) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23002) END FROM WidgetInst WHERE WidgetInstId = 23002)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23015) END FROM WidgetInst WHERE WidgetInstId = 23015) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23003) END FROM WidgetInst WHERE WidgetInstId = 23003)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23014) END FROM WidgetInst WHERE WidgetInstId = 23014) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23002) END FROM WidgetInst WHERE WidgetInstId = 23002)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23015) END FROM WidgetInst WHERE WidgetInstId = 23015) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23003) END FROM WidgetInst WHERE WidgetInstId = 23003)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23032) END FROM WidgetInst WHERE WidgetInstId = 23032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23033) END FROM WidgetInst WHERE WidgetInstId = 23033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23032) END FROM WidgetInst WHERE WidgetInstId = 23032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23033) END FROM WidgetInst WHERE WidgetInstId = 23033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23032) END FROM WidgetInst WHERE WidgetInstId = 23032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23033) END FROM WidgetInst WHERE WidgetInstId = 23033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23032) END FROM WidgetInst WHERE WidgetInstId = 23032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23033) END FROM WidgetInst WHERE WidgetInstId = 23033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23080) END FROM WidgetInst WHERE WidgetInstId = 23080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23081) END FROM WidgetInst WHERE WidgetInstId = 23081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23080) END FROM WidgetInst WHERE WidgetInstId = 23080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23081) END FROM WidgetInst WHERE WidgetInstId = 23081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23080) END FROM WidgetInst WHERE WidgetInstId = 23080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23081) END FROM WidgetInst WHERE WidgetInstId = 23081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23080) END FROM WidgetInst WHERE WidgetInstId = 23080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23081) END FROM WidgetInst WHERE WidgetInstId = 23081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 23124) END FROM WidgetInst WHERE WidgetInstId = 23124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 23125) END FROM WidgetInst WHERE WidgetInstId = 23125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23124) END FROM WidgetInst WHERE WidgetInstId = 23124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23125) END FROM WidgetInst WHERE WidgetInstId = 23125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23124) END FROM WidgetInst WHERE WidgetInstId = 23124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23125) END FROM WidgetInst WHERE WidgetInstId = 23125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23124) END FROM WidgetInst WHERE WidgetInstId = 23124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23125) END FROM WidgetInst WHERE WidgetInstId = 23125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23124) END FROM WidgetInst WHERE WidgetInstId = 23124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23125) END FROM WidgetInst WHERE WidgetInstId = 23125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23124) END FROM WidgetInst WHERE WidgetInstId = 23124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23125) END FROM WidgetInst WHERE WidgetInstId = 23125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22682) END FROM WidgetInst WHERE WidgetInstId = 22682) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22683) END FROM WidgetInst WHERE WidgetInstId = 22683) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 23154) END FROM WidgetInst WHERE WidgetInstId = 23154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 23155) END FROM WidgetInst WHERE WidgetInstId = 23155) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23209) END FROM WidgetInst WHERE WidgetInstId = 23209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 23209) END FROM WidgetInst WHERE WidgetInstId = 23209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23218) END FROM WidgetInst WHERE WidgetInstId = 23218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23219) END FROM WidgetInst WHERE WidgetInstId = 23219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23220) END FROM WidgetInst WHERE WidgetInstId = 23220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23221) END FROM WidgetInst WHERE WidgetInstId = 23221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 23218) END FROM WidgetInst WHERE WidgetInstId = 23218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 23219) END FROM WidgetInst WHERE WidgetInstId = 23219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 23220) END FROM WidgetInst WHERE WidgetInstId = 23220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 23221) END FROM WidgetInst WHERE WidgetInstId = 23221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 23242) END FROM WidgetInst WHERE WidgetInstId = 23242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 23242) END FROM WidgetInst WHERE WidgetInstId = 23242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 23255) END FROM WidgetInst WHERE WidgetInstId = 23255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 23257) END FROM WidgetInst WHERE WidgetInstId = 23257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 23255) END FROM WidgetInst WHERE WidgetInstId = 23255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 23257) END FROM WidgetInst WHERE WidgetInstId = 23257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23255) END FROM WidgetInst WHERE WidgetInstId = 23255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23257) END FROM WidgetInst WHERE WidgetInstId = 23257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23255) END FROM WidgetInst WHERE WidgetInstId = 23255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23257) END FROM WidgetInst WHERE WidgetInstId = 23257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23255) END FROM WidgetInst WHERE WidgetInstId = 23255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 23257) END FROM WidgetInst WHERE WidgetInstId = 23257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 23255) END FROM WidgetInst WHERE WidgetInstId = 23255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 23257) END FROM WidgetInst WHERE WidgetInstId = 23257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 23255) END FROM WidgetInst WHERE WidgetInstId = 23255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 23257) END FROM WidgetInst WHERE WidgetInstId = 23257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 23250) END FROM WidgetInst WHERE WidgetInstId = 23250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 23334) END FROM WidgetInst WHERE WidgetInstId = 23334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23344) END FROM WidgetInst WHERE WidgetInstId = 23344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 23347) END FROM WidgetInst WHERE WidgetInstId = 23347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 23352) END FROM WidgetInst WHERE WidgetInstId = 23352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 23352) END FROM WidgetInst WHERE WidgetInstId = 23352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23344) END FROM WidgetInst WHERE WidgetInstId = 23344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23370;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23384;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23384;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23384;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23384;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23384;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23387) END FROM WidgetInst WHERE WidgetInstId = 23387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23404) END FROM WidgetInst WHERE WidgetInstId = 23404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23404) END FROM WidgetInst WHERE WidgetInstId = 23404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23413) END FROM WidgetInst WHERE WidgetInstId = 23413) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23413) END FROM WidgetInst WHERE WidgetInstId = 23413) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23413) END FROM WidgetInst WHERE WidgetInstId = 23413) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23425) END FROM WidgetInst WHERE WidgetInstId = 23425)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23425) END FROM WidgetInst WHERE WidgetInstId = 23425)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23443) END FROM WidgetInst WHERE WidgetInstId = 23443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23443) END FROM WidgetInst WHERE WidgetInstId = 23443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23427) END FROM WidgetInst WHERE WidgetInstId = 23427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23488) END FROM WidgetInst WHERE WidgetInstId = 23488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23488) END FROM WidgetInst WHERE WidgetInstId = 23488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23488) END FROM WidgetInst WHERE WidgetInstId = 23488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23504) END FROM WidgetInst WHERE WidgetInstId = 23504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23504) END FROM WidgetInst WHERE WidgetInstId = 23504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23504) END FROM WidgetInst WHERE WidgetInstId = 23504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23524) END FROM WidgetInst WHERE WidgetInstId = 23524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23524) END FROM WidgetInst WHERE WidgetInstId = 23524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23524) END FROM WidgetInst WHERE WidgetInstId = 23524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23544) END FROM WidgetInst WHERE WidgetInstId = 23544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23544) END FROM WidgetInst WHERE WidgetInstId = 23544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23544) END FROM WidgetInst WHERE WidgetInstId = 23544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23550) END FROM WidgetInst WHERE WidgetInstId = 23550) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23544) END FROM WidgetInst WHERE WidgetInstId = 23544)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23550) END FROM WidgetInst WHERE WidgetInstId = 23550) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23544) END FROM WidgetInst WHERE WidgetInstId = 23544)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23550) END FROM WidgetInst WHERE WidgetInstId = 23550) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23544) END FROM WidgetInst WHERE WidgetInstId = 23544)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23559) END FROM WidgetInst WHERE WidgetInstId = 23559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23559) END FROM WidgetInst WHERE WidgetInstId = 23559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23559) END FROM WidgetInst WHERE WidgetInstId = 23559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23559) END FROM WidgetInst WHERE WidgetInstId = 23559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23384) END FROM WidgetInst WHERE WidgetInstId = 23384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23583) END FROM WidgetInst WHERE WidgetInstId = 23583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23583) END FROM WidgetInst WHERE WidgetInstId = 23583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23583) END FROM WidgetInst WHERE WidgetInstId = 23583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23583) END FROM WidgetInst WHERE WidgetInstId = 23583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 23605) END FROM WidgetInst WHERE WidgetInstId = 23605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23605) END FROM WidgetInst WHERE WidgetInstId = 23605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23605) END FROM WidgetInst WHERE WidgetInstId = 23605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23605) END FROM WidgetInst WHERE WidgetInstId = 23605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23605) END FROM WidgetInst WHERE WidgetInstId = 23605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23605) END FROM WidgetInst WHERE WidgetInstId = 23605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 23620) END FROM WidgetInst WHERE WidgetInstId = 23620) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23621;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23637;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23637;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23637;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23637;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23637;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23637;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23638;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23638;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23638;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23638;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23638;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23638;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23641;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23641;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23641;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23641;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23641;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23641;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23642;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23642;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23642;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23642;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23642;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23642;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23643;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23643;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23643;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23643;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23643;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23658) END FROM WidgetInst WHERE WidgetInstId = 23658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23659) END FROM WidgetInst WHERE WidgetInstId = 23659) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23662) END FROM WidgetInst WHERE WidgetInstId = 23662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23663) END FROM WidgetInst WHERE WidgetInstId = 23663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23664) END FROM WidgetInst WHERE WidgetInstId = 23664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23777) END FROM WidgetInst WHERE WidgetInstId = 23777) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23778) END FROM WidgetInst WHERE WidgetInstId = 23778) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23781) END FROM WidgetInst WHERE WidgetInstId = 23781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23782) END FROM WidgetInst WHERE WidgetInstId = 23782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23783) END FROM WidgetInst WHERE WidgetInstId = 23783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23777) END FROM WidgetInst WHERE WidgetInstId = 23777) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23778) END FROM WidgetInst WHERE WidgetInstId = 23778) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23781) END FROM WidgetInst WHERE WidgetInstId = 23781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23782) END FROM WidgetInst WHERE WidgetInstId = 23782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23783) END FROM WidgetInst WHERE WidgetInstId = 23783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23840) END FROM WidgetInst WHERE WidgetInstId = 23840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23841) END FROM WidgetInst WHERE WidgetInstId = 23841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23844) END FROM WidgetInst WHERE WidgetInstId = 23844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23845) END FROM WidgetInst WHERE WidgetInstId = 23845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23846) END FROM WidgetInst WHERE WidgetInstId = 23846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23840) END FROM WidgetInst WHERE WidgetInstId = 23840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23841) END FROM WidgetInst WHERE WidgetInstId = 23841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23844) END FROM WidgetInst WHERE WidgetInstId = 23844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23845) END FROM WidgetInst WHERE WidgetInstId = 23845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23846) END FROM WidgetInst WHERE WidgetInstId = 23846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23840) END FROM WidgetInst WHERE WidgetInstId = 23840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23841) END FROM WidgetInst WHERE WidgetInstId = 23841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23844) END FROM WidgetInst WHERE WidgetInstId = 23844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23845) END FROM WidgetInst WHERE WidgetInstId = 23845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23846) END FROM WidgetInst WHERE WidgetInstId = 23846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23924) END FROM WidgetInst WHERE WidgetInstId = 23924)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23925) END FROM WidgetInst WHERE WidgetInstId = 23925)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23928) END FROM WidgetInst WHERE WidgetInstId = 23928)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23929) END FROM WidgetInst WHERE WidgetInstId = 23929)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23930) END FROM WidgetInst WHERE WidgetInstId = 23930)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23967;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23970;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23924) END FROM WidgetInst WHERE WidgetInstId = 23924)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23925) END FROM WidgetInst WHERE WidgetInstId = 23925)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23928) END FROM WidgetInst WHERE WidgetInstId = 23928)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23929) END FROM WidgetInst WHERE WidgetInstId = 23929)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23930) END FROM WidgetInst WHERE WidgetInstId = 23930)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24050) END FROM WidgetInst WHERE WidgetInstId = 24050) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24051) END FROM WidgetInst WHERE WidgetInstId = 24051) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24054) END FROM WidgetInst WHERE WidgetInstId = 24054) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24055) END FROM WidgetInst WHERE WidgetInstId = 24055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24056) END FROM WidgetInst WHERE WidgetInstId = 24056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24050) END FROM WidgetInst WHERE WidgetInstId = 24050) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24051) END FROM WidgetInst WHERE WidgetInstId = 24051) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24054) END FROM WidgetInst WHERE WidgetInstId = 24054) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24055) END FROM WidgetInst WHERE WidgetInstId = 24055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24090;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24056) END FROM WidgetInst WHERE WidgetInstId = 24056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23938) END FROM WidgetInst WHERE WidgetInstId = 23938) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23939) END FROM WidgetInst WHERE WidgetInstId = 23939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23942) END FROM WidgetInst WHERE WidgetInstId = 23942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23943) END FROM WidgetInst WHERE WidgetInstId = 23943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23944) END FROM WidgetInst WHERE WidgetInstId = 23944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24365) END FROM WidgetInst WHERE WidgetInstId = 24365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24366) END FROM WidgetInst WHERE WidgetInstId = 24366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24369) END FROM WidgetInst WHERE WidgetInstId = 24369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24370) END FROM WidgetInst WHERE WidgetInstId = 24370) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24371) END FROM WidgetInst WHERE WidgetInstId = 24371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24365) END FROM WidgetInst WHERE WidgetInstId = 24365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24366) END FROM WidgetInst WHERE WidgetInstId = 24366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24369) END FROM WidgetInst WHERE WidgetInstId = 24369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24370) END FROM WidgetInst WHERE WidgetInstId = 24370) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24371) END FROM WidgetInst WHERE WidgetInstId = 24371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24365) END FROM WidgetInst WHERE WidgetInstId = 24365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24366) END FROM WidgetInst WHERE WidgetInstId = 24366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24369) END FROM WidgetInst WHERE WidgetInstId = 24369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24370) END FROM WidgetInst WHERE WidgetInstId = 24370) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24371) END FROM WidgetInst WHERE WidgetInstId = 24371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24477) END FROM WidgetInst WHERE WidgetInstId = 24477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24478) END FROM WidgetInst WHERE WidgetInstId = 24478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24481) END FROM WidgetInst WHERE WidgetInstId = 24481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24482) END FROM WidgetInst WHERE WidgetInstId = 24482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24483) END FROM WidgetInst WHERE WidgetInstId = 24483) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24477) END FROM WidgetInst WHERE WidgetInstId = 24477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24478) END FROM WidgetInst WHERE WidgetInstId = 24478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24481) END FROM WidgetInst WHERE WidgetInstId = 24481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24482) END FROM WidgetInst WHERE WidgetInstId = 24482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24483) END FROM WidgetInst WHERE WidgetInstId = 24483) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24477) END FROM WidgetInst WHERE WidgetInstId = 24477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24478) END FROM WidgetInst WHERE WidgetInstId = 24478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24481) END FROM WidgetInst WHERE WidgetInstId = 24481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24482) END FROM WidgetInst WHERE WidgetInstId = 24482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24483) END FROM WidgetInst WHERE WidgetInstId = 24483) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24617) END FROM WidgetInst WHERE WidgetInstId = 24617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24618) END FROM WidgetInst WHERE WidgetInstId = 24618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24621) END FROM WidgetInst WHERE WidgetInstId = 24621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24622) END FROM WidgetInst WHERE WidgetInstId = 24622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24623) END FROM WidgetInst WHERE WidgetInstId = 24623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24617) END FROM WidgetInst WHERE WidgetInstId = 24617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24618) END FROM WidgetInst WHERE WidgetInstId = 24618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24621) END FROM WidgetInst WHERE WidgetInstId = 24621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24622) END FROM WidgetInst WHERE WidgetInstId = 24622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24623) END FROM WidgetInst WHERE WidgetInstId = 24623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24617) END FROM WidgetInst WHERE WidgetInstId = 24617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24618) END FROM WidgetInst WHERE WidgetInstId = 24618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24621) END FROM WidgetInst WHERE WidgetInstId = 24621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24622) END FROM WidgetInst WHERE WidgetInstId = 24622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24623) END FROM WidgetInst WHERE WidgetInstId = 24623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24757) END FROM WidgetInst WHERE WidgetInstId = 24757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24758) END FROM WidgetInst WHERE WidgetInstId = 24758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24761) END FROM WidgetInst WHERE WidgetInstId = 24761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24762) END FROM WidgetInst WHERE WidgetInstId = 24762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24763) END FROM WidgetInst WHERE WidgetInstId = 24763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24757) END FROM WidgetInst WHERE WidgetInstId = 24757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24758) END FROM WidgetInst WHERE WidgetInstId = 24758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24761) END FROM WidgetInst WHERE WidgetInstId = 24761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24762) END FROM WidgetInst WHERE WidgetInstId = 24762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24763) END FROM WidgetInst WHERE WidgetInstId = 24763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24757) END FROM WidgetInst WHERE WidgetInstId = 24757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24758) END FROM WidgetInst WHERE WidgetInstId = 24758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24761) END FROM WidgetInst WHERE WidgetInstId = 24761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24762) END FROM WidgetInst WHERE WidgetInstId = 24762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24763) END FROM WidgetInst WHERE WidgetInstId = 24763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24799) END FROM WidgetInst WHERE WidgetInstId = 24799) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24757) END FROM WidgetInst WHERE WidgetInstId = 24757)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24800) END FROM WidgetInst WHERE WidgetInstId = 24800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24758) END FROM WidgetInst WHERE WidgetInstId = 24758)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24803) END FROM WidgetInst WHERE WidgetInstId = 24803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24761) END FROM WidgetInst WHERE WidgetInstId = 24761)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24804) END FROM WidgetInst WHERE WidgetInstId = 24804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24762) END FROM WidgetInst WHERE WidgetInstId = 24762)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24805) END FROM WidgetInst WHERE WidgetInstId = 24805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24763) END FROM WidgetInst WHERE WidgetInstId = 24763)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24799) END FROM WidgetInst WHERE WidgetInstId = 24799) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24757) END FROM WidgetInst WHERE WidgetInstId = 24757)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24800) END FROM WidgetInst WHERE WidgetInstId = 24800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24758) END FROM WidgetInst WHERE WidgetInstId = 24758)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24803) END FROM WidgetInst WHERE WidgetInstId = 24803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24761) END FROM WidgetInst WHERE WidgetInstId = 24761)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24804) END FROM WidgetInst WHERE WidgetInstId = 24804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24762) END FROM WidgetInst WHERE WidgetInstId = 24762)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24805) END FROM WidgetInst WHERE WidgetInstId = 24805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24763) END FROM WidgetInst WHERE WidgetInstId = 24763)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24799) END FROM WidgetInst WHERE WidgetInstId = 24799) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24757) END FROM WidgetInst WHERE WidgetInstId = 24757)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24800) END FROM WidgetInst WHERE WidgetInstId = 24800) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24758) END FROM WidgetInst WHERE WidgetInstId = 24758)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24803) END FROM WidgetInst WHERE WidgetInstId = 24803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24761) END FROM WidgetInst WHERE WidgetInstId = 24761)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24804) END FROM WidgetInst WHERE WidgetInstId = 24804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24762) END FROM WidgetInst WHERE WidgetInstId = 24762)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24805) END FROM WidgetInst WHERE WidgetInstId = 24805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24763) END FROM WidgetInst WHERE WidgetInstId = 24763)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24862) END FROM WidgetInst WHERE WidgetInstId = 24862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24863) END FROM WidgetInst WHERE WidgetInstId = 24863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24866) END FROM WidgetInst WHERE WidgetInstId = 24866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24867) END FROM WidgetInst WHERE WidgetInstId = 24867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24868) END FROM WidgetInst WHERE WidgetInstId = 24868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24862) END FROM WidgetInst WHERE WidgetInstId = 24862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24863) END FROM WidgetInst WHERE WidgetInstId = 24863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24866) END FROM WidgetInst WHERE WidgetInstId = 24866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24867) END FROM WidgetInst WHERE WidgetInstId = 24867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24868) END FROM WidgetInst WHERE WidgetInstId = 24868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24862) END FROM WidgetInst WHERE WidgetInstId = 24862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24863) END FROM WidgetInst WHERE WidgetInstId = 24863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24866) END FROM WidgetInst WHERE WidgetInstId = 24866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24867) END FROM WidgetInst WHERE WidgetInstId = 24867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24868) END FROM WidgetInst WHERE WidgetInstId = 24868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24862) END FROM WidgetInst WHERE WidgetInstId = 24862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24863) END FROM WidgetInst WHERE WidgetInstId = 24863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24866) END FROM WidgetInst WHERE WidgetInstId = 24866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24867) END FROM WidgetInst WHERE WidgetInstId = 24867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24868) END FROM WidgetInst WHERE WidgetInstId = 24868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25030) END FROM WidgetInst WHERE WidgetInstId = 25030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25031) END FROM WidgetInst WHERE WidgetInstId = 25031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25034) END FROM WidgetInst WHERE WidgetInstId = 25034) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25035) END FROM WidgetInst WHERE WidgetInstId = 25035) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25036) END FROM WidgetInst WHERE WidgetInstId = 25036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25030) END FROM WidgetInst WHERE WidgetInstId = 25030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25031) END FROM WidgetInst WHERE WidgetInstId = 25031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25034) END FROM WidgetInst WHERE WidgetInstId = 25034) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25035) END FROM WidgetInst WHERE WidgetInstId = 25035) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25036) END FROM WidgetInst WHERE WidgetInstId = 25036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 25030) END FROM WidgetInst WHERE WidgetInstId = 25030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 25031) END FROM WidgetInst WHERE WidgetInstId = 25031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 25034) END FROM WidgetInst WHERE WidgetInstId = 25034) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 25035) END FROM WidgetInst WHERE WidgetInstId = 25035) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 25036) END FROM WidgetInst WHERE WidgetInstId = 25036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 25030) END FROM WidgetInst WHERE WidgetInstId = 25030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 25031) END FROM WidgetInst WHERE WidgetInstId = 25031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 25034) END FROM WidgetInst WHERE WidgetInstId = 25034) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 25035) END FROM WidgetInst WHERE WidgetInstId = 25035) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 25036) END FROM WidgetInst WHERE WidgetInstId = 25036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 25184) END FROM WidgetInst WHERE WidgetInstId = 25184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 25185) END FROM WidgetInst WHERE WidgetInstId = 25185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 25188) END FROM WidgetInst WHERE WidgetInstId = 25188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 25189) END FROM WidgetInst WHERE WidgetInstId = 25189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 25190) END FROM WidgetInst WHERE WidgetInstId = 25190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25184) END FROM WidgetInst WHERE WidgetInstId = 25184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25185) END FROM WidgetInst WHERE WidgetInstId = 25185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25188) END FROM WidgetInst WHERE WidgetInstId = 25188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25189) END FROM WidgetInst WHERE WidgetInstId = 25189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25190) END FROM WidgetInst WHERE WidgetInstId = 25190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25184) END FROM WidgetInst WHERE WidgetInstId = 25184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25185) END FROM WidgetInst WHERE WidgetInstId = 25185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25188) END FROM WidgetInst WHERE WidgetInstId = 25188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25189) END FROM WidgetInst WHERE WidgetInstId = 25189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25190) END FROM WidgetInst WHERE WidgetInstId = 25190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25184) END FROM WidgetInst WHERE WidgetInstId = 25184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25185) END FROM WidgetInst WHERE WidgetInstId = 25185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25188) END FROM WidgetInst WHERE WidgetInstId = 25188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25189) END FROM WidgetInst WHERE WidgetInstId = 25189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25190) END FROM WidgetInst WHERE WidgetInstId = 25190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25184) END FROM WidgetInst WHERE WidgetInstId = 25184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25185) END FROM WidgetInst WHERE WidgetInstId = 25185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25188) END FROM WidgetInst WHERE WidgetInstId = 25188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25189) END FROM WidgetInst WHERE WidgetInstId = 25189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25190) END FROM WidgetInst WHERE WidgetInstId = 25190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25184) END FROM WidgetInst WHERE WidgetInstId = 25184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25185) END FROM WidgetInst WHERE WidgetInstId = 25185) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25188) END FROM WidgetInst WHERE WidgetInstId = 25188) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25189) END FROM WidgetInst WHERE WidgetInstId = 25189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 25190) END FROM WidgetInst WHERE WidgetInstId = 25190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23637) END FROM WidgetInst WHERE WidgetInstId = 23637) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 23242) END FROM WidgetInst WHERE WidgetInstId = 23242)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23638) END FROM WidgetInst WHERE WidgetInstId = 23638) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 23242) END FROM WidgetInst WHERE WidgetInstId = 23242)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25276;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23641) END FROM WidgetInst WHERE WidgetInstId = 23641) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 23242) END FROM WidgetInst WHERE WidgetInstId = 23242)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 23242) END FROM WidgetInst WHERE WidgetInstId = 23242)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23643) END FROM WidgetInst WHERE WidgetInstId = 23643) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 23242) END FROM WidgetInst WHERE WidgetInstId = 23242)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 25289) END FROM WidgetInst WHERE WidgetInstId = 25289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25296;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 25290) END FROM WidgetInst WHERE WidgetInstId = 25290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 25293) END FROM WidgetInst WHERE WidgetInstId = 25293) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25300;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 25294) END FROM WidgetInst WHERE WidgetInstId = 25294) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 25295) END FROM WidgetInst WHERE WidgetInstId = 25295) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25302;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 25314;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 25314;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 25314;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 25314;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 25314;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 25314;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 25315;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 25315;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 25315;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 25315;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 25315;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 25315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 25314) END FROM WidgetInst WHERE WidgetInstId = 25314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 25315) END FROM WidgetInst WHERE WidgetInstId = 25315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 25320) END FROM WidgetInst WHERE WidgetInstId = 25320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 25321) END FROM WidgetInst WHERE WidgetInstId = 25321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 25314) END FROM WidgetInst WHERE WidgetInstId = 25314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 25315) END FROM WidgetInst WHERE WidgetInstId = 25315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25327;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 23239) END FROM WidgetInst WHERE WidgetInstId = 23239) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 25314) END FROM WidgetInst WHERE WidgetInstId = 25314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 25315) END FROM WidgetInst WHERE WidgetInstId = 25315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25351;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25354) END FROM WidgetInst WHERE WidgetInstId = 25354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25355) END FROM WidgetInst WHERE WidgetInstId = 25355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25354) END FROM WidgetInst WHERE WidgetInstId = 25354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25355) END FROM WidgetInst WHERE WidgetInstId = 25355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 25314) END FROM WidgetInst WHERE WidgetInstId = 25314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 25315) END FROM WidgetInst WHERE WidgetInstId = 25315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25372) END FROM WidgetInst WHERE WidgetInstId = 25372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25373) END FROM WidgetInst WHERE WidgetInstId = 25373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25372) END FROM WidgetInst WHERE WidgetInstId = 25372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25373) END FROM WidgetInst WHERE WidgetInstId = 25373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 25372) END FROM WidgetInst WHERE WidgetInstId = 25372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 25373) END FROM WidgetInst WHERE WidgetInstId = 25373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 25314) END FROM WidgetInst WHERE WidgetInstId = 25314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 25315) END FROM WidgetInst WHERE WidgetInstId = 25315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 25314) END FROM WidgetInst WHERE WidgetInstId = 25314) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25396) END FROM WidgetInst WHERE WidgetInstId = 25396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 25315) END FROM WidgetInst WHERE WidgetInstId = 25315) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 25397) END FROM WidgetInst WHERE WidgetInstId = 25397)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 25400) END FROM WidgetInst WHERE WidgetInstId = 25400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 25401) END FROM WidgetInst WHERE WidgetInstId = 25401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 25400) END FROM WidgetInst WHERE WidgetInstId = 25400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 25401) END FROM WidgetInst WHERE WidgetInstId = 25401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 25400) END FROM WidgetInst WHERE WidgetInstId = 25400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 25401) END FROM WidgetInst WHERE WidgetInstId = 25401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 25400) END FROM WidgetInst WHERE WidgetInstId = 25400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 25401) END FROM WidgetInst WHERE WidgetInstId = 25401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 25314) END FROM WidgetInst WHERE WidgetInstId = 25314) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25396) END FROM WidgetInst WHERE WidgetInstId = 25396)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 25315) END FROM WidgetInst WHERE WidgetInstId = 25315) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 25397) END FROM WidgetInst WHERE WidgetInstId = 25397)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25421;


